#ifndef AGVSETDIALOG_H
#define AGVSETDIALOG_H

#include <QDialog>

#ifdef BUILD_X86_LINUX
#include "../CommunicateDelegate/gSoapFoundation/soapStub.h"
#endif
#include "../CommunicateDelegate/globaldata.h"


class CommunicateNormalDelegate;

namespace Ui {
class AgvSetDialog;
}

class AgvSetDialog : public QDialog
{
    Q_OBJECT

public:
    explicit AgvSetDialog(CommunicateNormalDelegate *communicateNormalIn,QWidget *parent = 0);
    ~AgvSetDialog();

public slots:
    void showWindowSlot();

private slots:
    void on_pushButton_setVehicleBorderOffset_clicked();

    void on_pushButton_reset_vehicle_calibrate_clicked();

    void on_pushButton_writeCollisionInfo_clicked();

    void on_tabWidget_tabBarClicked(int index);

    void on_comboBox_agvType_currentIndexChanged(int index);

    void on_pushButton_setVehicleBorderRect_clicked();

    void on_pushButton_setKinematicDimension_clicked();

    void on_pushButton_setLaserScan_clicked();

    void on_pushButton_setVehicleJogControl_clicked();

    void on_pushButton_setVehicleAutoMove_clicked();

    void on_pushButton_setVehicleSheftBorder_clicked();

    void on_pushButton_setLift_clicked();

    void on_pushButton_setRoller_clicked();

    void on_comboBox_borderId_currentIndexChanged(int index);

    void on_comboBox_barrierMode_currentIndexChanged(int index);

    void on_pushButton_setAmclConfig_clicked();

    void on_pushButton_recordStartPosition_clicked();

    void on_pushButton_recordStopPosition_clicked();

    void on_pushButton_setVehicleMotionCalibrateLength_clicked();

    void on_pushButton_recordStartPosition_2_clicked();

    void on_pushButton_recordStopPosition_2_clicked();

    void on_pushButton_setVehicleMotionCalibrateAngle_clicked();

    void on_pushButton_setIpAddress_clicked();

    void on_pushButton_setReflectLaserFilterPara_clicked();

    void on_pushButton_setReflectCalculateConfig_clicked();

    void on_pushButton_getReflectLaserFilterPara_clicked();

    void on_pushButton_setBatteryPeakConfig_clicked();

private:
    bool isAuthorityOk();
    void readBarrierSet();
    void readAgvBorderSet();
    void readLaserScanSet();
    void readMotionSet();
    void readSheftSet();
    void readAgvPositionCalibrateSet();
    void readLiftSet();
    void readRollerSet();
    void readAmclConfig();
    void readVehicleMotionCalibrate();
    void readReflectConfigInfo();
    void readReflectFilterInfo();
    void readBatteryPeakInfo();
    double transformToPi(double angleIn);

private:
    Ui::AgvSetDialog *ui;
    CommunicateNormalDelegate *communicateNormal;
};

#endif // AGVSETDIALOG_H
